#!/usr/bin/env node
const jsonfile = require('jsonfile');
const filename = './config.json';
let [ , , appid, key ] = process.argv;
if(appid && key) {
    console.log(`set appid= ${appid}, 秘钥= ${key}`);
    jsonfile.writeFile(filename, {
        appid,
        '秘钥':key
    }, function (err) {
        if (err) console.error(err.message);
    })
} else {
    console.log('输入有误')
}